import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:hc_bot_pro/chat/controller_bot.dart';

import '../controller.dart';

class EndButton extends StatelessWidget {
  const EndButton({super.key});

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: () {
        Get.find<ChatController>().endConversation();
      },
      child: Container(
        padding: EdgeInsets.symmetric(vertical: 8.h),
        decoration: BoxDecoration(
          color: Color(0xFF003A7F).withOpacity(0.07),
          borderRadius: BorderRadius.circular(10.sp),
        ),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Icon(Icons.offline_bolt).paddingOnly(right: 8.w),
            Text("结束对话", style: TextStyle(fontSize: 17.sp)),
          ],
        ),
      ),
    );
  }
}
